package celiasoft.itasalib.query;

import celiasoft.itasalib.filegatherer.IGatherer;
import celiasoft.itasalib.query.resultparser.IQueryResultParser;
import celiasoft.itasalib.query.resultparser.QueryAllNewsResultParser;
import celiasoft.itasalib.staticdata.ItasaStaticUrls;

public class AllPageNewsQuery extends Query {

	private int _page;

	public AllPageNewsQuery(IGatherer gatherer, String apikey) {
		super(gatherer, apikey);
	}

	@Override
	protected String getQueryUrl() {
		return String.format(ItasaStaticUrls.NEWS_PAGE_URL, getAPIKey(), this._page );
	}

	public int getPage(){
		return this._page;
	}
	
	public void setPage(int page){
		this._page = page;
	}
	
	
	@Override
	protected IQueryResultParser getResultParser() {
		
		return new QueryAllNewsResultParser();
	}

	
}
